Scenario #5002: Unsubscribe Person and Contact From Mailinglist

Properties

Required

Given

name value
mailingList operations-announce
subscriberEMailAddress michael.miller@example.org

Subscription: michael.miller@example.org

HTTP GET "/api/hs/office/relations?relationType=SUBSCRIBER&mark=operations-announce&contactData=michael.miller%40example.org" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "88771c26-7e8e-4289-91c3-f42eb8c9be4a", // Subscription: Michael Miller to operations-announce
  "anchor" : {
    "uuid" : "9e12338f-c1ea-4237-9d64-f085a84850c6", // Person: Test AG
    "personType" : "LEGAL_PERSON",
    "tradeName" : "Test AG",
    "salutation" : null,
    "title" : null,
    "givenName" : null,
    "familyName" : null
  },
  "holder" : {
    "uuid" : "01daf8a5-78ce-4d13-bd9e-f489023fe8c7", // Person: Michael Miller
    "personType" : "NATURAL_PERSON",
    "tradeName" : null,
    "salutation" : null,
    "title" : null,
    "givenName" : "Michael",
    "familyName" : "Miller"
  },
  "type" : "SUBSCRIBER",
  "mark" : "operations-announce",
  "contact" : {
    "uuid" : "308b0e9c-7c17-4fc9-a479-dc61a57bd459", // Contact: michael.miller@example.org
    "caption" : "Michael Miller",
    "postalAddress" : { },
    "emailAddresses" : {
      "main" : "michael.miller@example.org"
    },
    "phoneNumbers" : { }
  }
} ]

In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one.

Delete the Subscriber-Relation by its UUID

HTTP DELETE "/api/hs/office/relations/88771c26-7e8e-4289-91c3-f42eb8c9be4a" // Subscription: michael.miller@example.org \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 204 NO_CONTENT 

generated on 2026-08-10 04:34:24 for branch HEAD